(function ($) {
    const routes = [
        { path: '/data', component: MyData, children: [
            {
                path: 'base',
                component: base
            }, {
                path: 'expansion',
                component: expansion
            }, {
                path: 'certification',
                component: certification
            }, {
                path: 'setting',
                component: setting
            }]},
        { path: '/apply', component: MyApply},
        { path: '/apply/detail', component: MyApplyDetail},
        { path: '/message', component: MyMessage, children: [
            {
                path: 'company',
                component: company
            }, {
                path: 'apply',
                component: apply
            }, {
                path: 'system',
                component: system
            }, {
                path: 'quasi',
                component: quasi
            }]},
        { path: '/collection', component: MyCollection },
        { path: '/account', component: MyAccount }
    ]
    const router = new VueRouter({
        routes // （缩写）相当于 routes: routes
    })
    var _vueData = {
        init: function () {
            var vm = new Vue({
                router,
                el: "#StaffInfo",
                // 数据
                data: {
                    curLink: 'data',
                    linkArr: [
                        {
                            name: '我的资料',
                            linkName: 'data',
                            link: '/data/base'
                        }, {
                            name: '我的应聘',
                            linkName: 'apply',
                            link: '/apply'
                        }, {
                            name: '我的消息',
                            linkName: 'message',
                            link: '/message/company'
                        }, 
                        // {
                        //     name: '我的收藏',
                        //     linkName: 'collection',
                        //     link: '/collection'
                        // }, 
                        // {
                        //     name: '我的账号',
                        //     linkName: 'account',
                        //     link: '/account'
                        // }
                    ]
                },

                // 周期
                mounted: function () {},

                // 侦听器
                watch: {},

                // 计算属性
                computed: {

                },

                // 方法
                methods: {
                    onSLink: function (_value) {
                        var linkArr = ['data', 'apply', 'message', 'collection', 'account']
                        for(var i = 0;i < linkArr.length;i++) {

                        }
                        this.curLink = _value
                    }
                },

                // 周期
                created: function () {
                    this.$router.push({path:'/data/base'})
                },
            })
        }
    }
    _vueData.init()
})(jQuery)